﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Imaging;
using System.Windows.Shapes;

namespace BasicDataManagement
{
    /// <summary>
    /// Interaction logic for AddNewCat.xaml
    /// </summary>
    public partial class AddNewCatWindow : Window
    {
        public AddNewCatWindow()
        {
            InitializeComponent();
        }

        public string CatName { get; private set; }

        private void BtnOK_Click(object sender, RoutedEventArgs e)
        {
            CatName = newNameTB.Text;
            DialogResult = true;
            this.Close();
        }

        private void BtnCancel_Click(object sender, RoutedEventArgs e)
        {
            DialogResult = false;
            this.Close();
        }

        private void Window_Loaded(object sender, RoutedEventArgs e)
        {
            newNameTB.Focus();
        }
    }
}
